package com.niiwoo.civet.trade.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 借款流程节点信息
 * @Author LiJian
 * @date 2018/4/17
 */
@AllArgsConstructor
@Getter
public enum LoanNodeTypeEnum {

    LOAN_DATA_BACK_FLOW(10, "借款相关数据回流"),
    AUTH_STATUS_CHECK(20, "授权状态检测"),
    RISK_INFO_HANDLE(30, "12项风险规则处理"),
    LOAN_ANTI_FRAUD(40, "借款反欺诈"),
    LOAN_ANTI_FRAUD_BACK(50, "借款反欺诈回调"),
    LOAN_LIMIT_SCORE(60, "额度评分卡"),
	LOAN_TE_LIMIT_SCORE(61, "借款提额额度评分卡"),
	LOAN_LIMIT_SCORE_BACK(70, "额度评分卡回调"),
	LOAN_TE_LIMIT_SCORE_BACK(71, "借款提额额度评分卡回调"),
    LOAN_SYSTEM_AUDIT(80, "系统审核"),
    LOAN_SYSTEM_AUDIT_BACK(90, "系统审核回调"),
    PORTRAIT_AUTH(100, "肖像认证"),
    MANPOWER_AUDIT(110, "人工审核"),
    PROJECT_TO_BANK(120, "上标(自动审核开关开启)"),
	AUTO_AUDIT(130, "待确认");

    private Integer id;
    private String desc;

    public static LoanNodeTypeEnum enumof(Integer id) {
    	switch (id) {
    	case 10: //借款相关数据回流
    		return LOAN_DATA_BACK_FLOW;
    	case 20: //授权状态检测
    		return AUTH_STATUS_CHECK;
    	case 30: //12项风险规则处理
    		return RISK_INFO_HANDLE;
    	case 40: //借款反欺诈
    		return LOAN_ANTI_FRAUD;
    	case 50: //借款反欺诈回调
    		return LOAN_ANTI_FRAUD_BACK;
    	case 60: //额度评分卡
    		return LOAN_LIMIT_SCORE;
    	case 70: //额度评分卡回调
    		return LOAN_LIMIT_SCORE_BACK;
    	case 80: //系统审核
    		return LOAN_SYSTEM_AUDIT;
    	case 90: //系统审核回调
    		return LOAN_SYSTEM_AUDIT_BACK;
    	case 100: //肖像认证
    		return PORTRAIT_AUTH;
    	case 110: //人工审核
    		return MANPOWER_AUDIT;
    	case 120: //上标(自动审核开关开启)
    		return PROJECT_TO_BANK;
    	default:
    		return null;
    	}
    }
}
